package ua.com.fesvlast.hotel.controller.managers;

import java.util.ResourceBundle;

public class ConfigurationManager {
	
	private static ConfigurationManager instance;
	
	private ResourceBundle resourceBundle;
	
	private static final String BUNDLE_NAME="properties/config";
	
	public static final String DATABASE_DRIVER_NAME="DATABASE_DRIVER_NAME";
	public static final String DATABASE_URL="DATABASE_URL";
	public static final String DATABASE_USER="DATABASE_USER";
	public static final String DATABASE_PASSWORD="DATABASE_PASSWORD";
	
	public static final String POST_HOST="POST_HOST";
	public static final String HOST_EMAIL="HOST_EMAIL";
	public static final String EMAIL_USERNAME="EMAIL_USERNAME";
	public static final String EMAIL_PASSWORD="EMAIL_PASSWORD";
	
	
	
	public static final String ERROR_PAGE_PATH="ERROR_PAGE_PATH";
	public static final String LOGIN_PAGE_PATH="LOGIN_PAGE_PATH";
	public static final String MAIN_PAGE_PATH="MAIN_PAGE_PATH";
	public static final String REGISTRATION_PAGE="REGISTRATION_PAGE";
	public static final String HOTEL_ROOMS_PAGE = "HOTEL_ROOMS_PAGE";

	public static final String BILL_PAGE = "BILL_PAGE";
	public static String HOTEL_CHOSEN_ROOM="HOTEL_CHOSEN_ROOM";
	public static String FORWARD_ORDER_PAGE="FORWARD_ORDER_PAGE";
	public static String INDEX_PAGE="INDEX_PAGE";
	public static String ADMIN_LOOK_ORDERS="ADMIN_LOOK_ORDERS";
	public static String CONTACT_PAGE="CONTACT_PAGE";
	
	public static ConfigurationManager getInstance(){
		
		if(instance ==null){
			instance=new ConfigurationManager();
			instance.resourceBundle=ResourceBundle.getBundle(BUNDLE_NAME);
		}
		return instance;
	}
	
	public String getProperty(String key){
		return (String) resourceBundle.getObject(key);
	}
}
